<?php	
	class Conexion{
	
		private $servidor;
		private $usuario;
		private $contrasena;
		private $base;
		
		/*CONFIGURACION (datos servidor)*/
		
		const DB_SERVER = "localhost";				//Servidor de la DB
		const DB_USER = "root";						//Usuario de la DB
		const DB_PASS = "";							//Password de la DB
		const DB_NAME = "scrumorg";					//Nombre de la DB
		const HTTP = "http://localhost";			//Url del servidor (Ej:http://www.google.com.ar)
		const URL_BASE = "/scrumorg-html";			//Carpeta base
		const EMAIL = "info@scrumorg.com.ar";		//Email del que seran enviadas todas las notificaciones
		
		public function Conexion($servidor = Conexion::DB_SERVER, $usuario = Conexion::DB_USER, $contrasena = Conexion::DB_PASS){
			$this->servidor = $servidor;
			$this->usuario = $usuario;
			$this->contrasena = $contrasena;
		}
		
		public function conectar(){
			$cnx = mysql_connect($this->servidor, $this->usuario, $this->contrasena) or die ('Error al conectar con el servidor MySQL');
			return $cnx;
		}
		
		public function select($base = Conexion::DB_NAME){
			$this->base = $base;
			return mysql_select_db($base);
		}
	}
?>